﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;
using System.Drawing;

using System.Text;

using ViennaAdvantage.Common;

namespace ViennaAdvantageWeb
{
    public partial class GoogleTasks : System.Web.UI.Page
    {
        #region PrivateVariables
        private string AD_User_ID = string.Empty;
        private string AD_Client_ID = string.Empty;
        private string AD_Org_ID = string.Empty;
        private bool isTask = true;
        private string authCodes = string.Empty;
        GmailConfig config = null;



        #endregion
        protected void Page_Load(object sender, EventArgs e)
        {

            AD_User_ID = Request.QueryString["User"];
            AD_Client_ID = Request.QueryString["Client"];
            AD_Org_ID = Request.QueryString["Org"];
            isTask = Convert.ToBoolean(Request.QueryString["Task"]);
            try
            {
                authCodes = Request.QueryString["auth"];
                config = new GmailConfig(AD_User_ID, AD_Client_ID, AD_Org_ID, authCodes, isTask);
                lblMessage.Text = config.Start();
            }
            catch { }
        }
    }
}
